<?php

namespace app\common\model;

use think\Model;

class OrderItemAttribute extends Model
{
    protected $name = 'order_item_attribute';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = 'deletetime';

    protected $type = [
        'position' => 'array',
        'rotation' => 'array',
    ];

//    public function itemdata()
//    {
//        return $this->morphMany(OrderItem::class, ['data_type', 'data_id'], OrderItem::DATA_TYPE_ARTWORK);
//    }
}